package com.ruoyi.message.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.message.mapper.MessageReadMapper;
import com.ruoyi.message.domain.MessageRead;
import com.ruoyi.message.service.IMessageReadService;

/**
 * 阅读记录Service业务层处理
 * 
 * @author hct
 * @date 2022-04-14
 */
@Service
public class MessageReadServiceImpl implements IMessageReadService 
{
    @Autowired
    private MessageReadMapper messageReadMapper;

    /**
     * 查询阅读记录
     * 
     * @param id 阅读记录主键
     * @return 阅读记录
     */
    @Override
    public MessageRead selectMessageReadById(Long id)
    {
        return messageReadMapper.selectMessageReadById(id);
    }

    /**
     * 查询阅读记录列表
     * 
     * @param messageRead 阅读记录
     * @return 阅读记录
     */
    @Override
    public List<MessageRead> selectMessageReadList(MessageRead messageRead)
    {
        return messageReadMapper.selectMessageReadList(messageRead);
    }

    /**
     * 新增阅读记录
     * 
     * @param messageRead 阅读记录
     * @return 结果
     */
    @Override
    public int insertMessageRead(MessageRead messageRead)
    {
        return messageReadMapper.insertMessageRead(messageRead);
    }

    /**
     * 修改阅读记录
     * 
     * @param messageRead 阅读记录
     * @return 结果
     */
    @Override
    public int updateMessageRead(MessageRead messageRead)
    {
        return messageReadMapper.updateMessageRead(messageRead);
    }

    /**
     * 批量删除阅读记录
     * 
     * @param ids 需要删除的阅读记录主键
     * @return 结果
     */
    @Override
    public int deleteMessageReadByIds(Long[] ids)
    {
        return messageReadMapper.deleteMessageReadByIds(ids);
    }

    /**
     * 删除阅读记录信息
     * 
     * @param id 阅读记录主键
     * @return 结果
     */
    @Override
    public int deleteMessageReadById(Long id)
    {
        return messageReadMapper.deleteMessageReadById(id);
    }
}
